/**
 * Created with IntelliJ IDEA
 * Description:
 * User:恋恋
 * Date:2022-04-02
 * Time:15:08
 */
public class Person{//

    private String name = "Person";
    //对类的实现细节进行隐藏，只在当前类中使用

    int age=0;

}

public class Child extends Person{//继承

    public String grade;

    public static void main(String[] args){

        Person p = new Child();

        System.out.println(p.name);//因此name属于Person类中，所以不可以被对象访问

    }

}